import request from "@/utils/request.js";

/**
 * 活动列表
 */
export function getActivityList(data) {
    return request.get(`activity/list`, data, {
        noAuth: true
    });
}

/**
 * 活动详情
 */
export function getActivityInfo(id) {
    return request.get(`activity/info/${id}`, {}, {
        noAuth: true
    });
}

/**
 * 报名活动
 */
export function joinActivity(data) {
    return request.post(`activity/join_activity/${data.id}`, data, {
        noAuth: true
    });
}

/**
 * 活动支付
 */
export function payActivity(data) {
    return request.post(`activity/pay_activity/${data.id}`, data, {
        noAuth: true
    });
}

/**
 * 用户参与活动列表
 */
export function userActivityList(data) {
    return request.get(`user_activity/list`, data, {
        noAuth: true
    });
}

/**
 * 用户参与活动列表收藏
 */
export function userActivityLikeList(data) {
    return request.get(`user_activity/like_list`, data, {
        noAuth: true
    });
}

/**
 * 演出列表
 */
export function performList(data) {
    return request.get(`perform/list`, data, {
        noAuth: true
    });
}

/**
 * 演出详情
 */
export function performInfo(id) {
    return request.get(`perform/info/${id}`, {}, {
        noAuth: true
    });
}

/**
 * 演出详情座位列表
 */
export function performChoiceList(id) {
    return request.get(`perform/choice_list/${id}`, {}, {
        noAuth: true
    });
}
// 演出区域列表
export function locationList(id,perform_id) {
    return request.get(`location/list?perform_id=${perform_id}&pid=${id}`, {}, {
        noAuth: true
    });
}
// 演出区域座位列表
export function areaList(id) {
    return request.get(`area/list?perform_id=${id}`, {}, {
        noAuth: true
    });
}

// 座位详情
// https://xuantian.cqmv.com/api/perform/region_choice_list/:ID/:区域编号
export function performRegion_choice_list(id,codeNumber) {
    return request.get(`perform/region_choice_list/${id}/${codeNumber}`, {}, {
        noAuth: true
    });
}
/**
 * 演出详情预定座位
 */
export function performAddChoice(id, data) {
    return request.post(`perform/add_choice/${id}`, data, {
        noAuth: true
    });
}

/**
 * 演出分类
 */
export function performCategoryList() {
    return request.get(`perform/category_list`, {}, {
        noAuth: true
    });
}
/**
 * 购票通知
 */
export function performArticeList() {
    return request.get(`perform/artice_list`, {}, {
        noAuth: true
    });
}


/**
 * 景区通知
 */
export function performScenicArticeList() {
    return request.get(`perform/scenic_nofity_list`, {}, {
        noAuth: true
    });
}


/**
 * 平台通知公告
 */
export function plantformNotifyList() {
    return request.get(`perform/plantform_nofity_list`, {}, {
        noAuth: true
    });
}
/**
 * 购票支付
 */
export function performPay(data) {
    return request.post(`perform/pay/${data.order_sn}`, data, {
        noAuth: true
    });
}
/**
 * 预定餐饮
 */
export function insert_merchant_reserve(data) {
    return request.post(`store/merchant/insert_merchant_reserve`, data, {
        noAuth: true
    });
}
/**
 * 用户购票记录
 */
export function performUserPerformList(data) {
    return request.get(`perform/user_perform_list`, data, {
        noAuth: true
    });
}

/**
 * 退票
 */
export function performRefundOrder(id) {
    return request.get(`perform/refund_order/${id}`, {}, {
        noAuth: true
    });
}

/**
 * 取消订单
 */
export function performDelOrder(id) {
    return request.get(`perform/del_order/${id}`, {}, {
        noAuth: true
    });
}
/**
 * 活动分类
 */
export function activityCategoryList(data) {
    return request.get(`activity/category_list`, data, {
        noAuth: true
    });
}

/**
 * 收藏活动
 */
export function activityLikeActivity(id) {
    return request.post(`activity/like_activity/${id}`, {}, {
        noAuth: true
    });
}

/**
 * 活动退款
 */
export function activityRefundOrder(id, data) {
    return request.post(`user_activity/refund_order/${id}`, data, {
        noAuth: true
    });
}

/**
 * 演出订单详情
 */
export function performGetOrderDetail(order_sn,per_id) {
    return request.get(`perform/get_order_detail/${order_sn}/${per_id}`, {}, {
        noAuth: true
    });
}
// 订餐订单详情
export function show_merchant_reserve(order_sn) {
    return request.get(`store/merchant/show_merchant_reserve/${order_sn}`, {}, {
        noAuth: true
    });
}

// 演出预售时间
export function peformDatelist(perform_id) {
    return request.get(`perform/datelist/${perform_id}`, {}, {
        noAuth: true
    });
}

/**
 * 展出预约
 */
export function performSubscribe(id, data) {
    return request.post(`perform/subscribe/${id}`, data, {
        noAuth: true
    });
}